import React, { Component } from 'react'
import { NavBar, } from 'antd-mobile';
import "./my.css"
export default class my extends Component {
  state = {
     hidden: true
    // nemu:true//相对应改造显示隐藏
  }
  handleClick = (params) => {
    this.setState({
      hidden:!this.state.hidden
      // nemu:!this.state.nemu相对应改造
    })
  }
  goToHome = (params) => {
    this.props.history.push("/")
    this.setState({
      hidden:true
    })
  };
  goToBangDan = (params) => {
    this.props.history.push("/bangDan")
  }
  goToReDian = (params) => {
    this.props.history.push("/reDian")
  }
  goToMyCoupon=(params) => {
    this.props.history.push("/myCoupon")
  }
  goToLogin=(params) => {
    this.props.history.push("/login")
  }


  goToVideo=()=>{{
this.props.history.push('/')
  }}
  
  render() {
    return (
      <div className="my-content">
        <NavBar className="my-navbar"
 onLeftClick={() => window.history.go(-1)}
        >我的
       <div className={this.state.hidden ? "nemu hidden" : "nemu"}>
       {/* <div className={this.state.nemu?"nemu hidden" : "nemu"}>//相对应改造 */}
         {/* 动态参数 */}
            <p onClick={this.goToHome}>首页</p>
            <p onClick={this.goToBangDan}>榜单</p>
            <p onClick={this. goToReDian}>热点</p>
       
          </div>
          <i className="iconfont icon-webicon03" onClick={this.handleClick}></i>


        </NavBar>
        <div className="my-main">

          <img src="https://img.meituan.net/maoyanuser/675d3a8bbe27febcf1ccd8c2a25d891210399.png" alt="" 
          onClick={this.goToLogin}
          
          />

        </div>
        <div className="my-goods">
          <div className="my-goods-top">

            <span className="title">我的订单</span>

          </div>
          <div className="my-goods-button">
            <div className="my-goods-button-left" onClick={this.goToVideo}>
              <i className="iconfont icon-dianying1"></i>
              <p>电影</p>
            </div>
            <div className="my-goods-button-right">
              <i className="iconfont icon-shangcheng"></i>
              <p>商城</p>
            </div>
          </div>
        </div>
        <div className="foot-youhoujuan">
          <p onClick={this.goToMyCoupon}>优惠券</p>
          <i className="iconfont icon-youjiantou-01" onClick={this.goToMyCoupon}></i>
        </div>
        <div className="foot-youhoujuan">
          <p>折扣卡</p>
          <i className="iconfont icon-youjiantou-01"></i>
        </div>
      </div>
    )
  }
}
